package com.len.entity;

public class FieldTypeEnum {
    /**
     * 字符类型
     */
    private Integer character = 0;
    /**
     * 整数类型
     */
    private Integer intNumber = 1;
    /**
     * 单精度浮点类型
     */
    private Integer floatNumber = 2;
    /**
     * 双精度浮点类型
     */
    private Integer doubleNumber = 3;
    /**
     * 布尔类型
     */
    private Integer boolNumber = 4;
    /**
     * 对象类型
     */
    private Integer object = 5;
    /**
     * 集合类型
     */
    private Integer collection = 6;


    public static String getColumnTypeByDictValue(Integer dictValue) {
        String value = "VARCHAR";
        switch (dictValue) {
            case 0: {
                value = "VARCHAR";
                break;
            }
            case 1: {
                value = "INTEGER";
                break;
            }
            case 2: {
                value = "DOUBLE";
                break;
            }
            case 3: {
                value = "DOUBLE";
                break;
            }
            case 4: {
                value = "BOOLEAN";
                break;
            }
            case 5: {
                value = "DATE";
                break;
            }
            case 6: {
                value = "VARCHAR";
                break;
            }
        }
        return value;
    }


    public static String getQueryBuilderTypeByDictValue(Integer dictValue) {
        String value = "string";
        switch (dictValue) {
            case 0: {
                value = "string";
                break;
            }
            case 1: {
                value = "integer";
                break;
            }
            case 2: {
                value = "double";
                break;
            }
            case 3: {
                value = "boolean";
                break;
            }
            case 4: {
                value = "date";
                break;
            }
        }
        return value;
    }
}
